package viewmodel;

import model.Entity;
import android.app.betmein.R;
import android.app.betmein.view.EntityView;
import android.content.Context;
import android.framework.binding.Binding;
import android.framework.paging.BaseViewModel;
import android.framework.reflaction.annotation.OnClickListenerInjectionAnnotation;

public class EntityGeneralInfoViewModel extends BaseViewModel<EntityView>{
	
	private Entity entity;
	
	public EntityGeneralInfoViewModel(Context ctx, Entity entity){
		super(ctx);
		this.entity = entity;
	}
	
	
	@OnClickListenerInjectionAnnotation(R.id.buttonTest)
	public void onButtonClick(){
		
	}

	@Override
	public void onInit() {
		EntityView view = getView();
		view.entityImage.setImageDrawable(entity.getPicture());
		Binding.attached(entity.getDescription(), view.entityDescription);
		Binding.attached(entity.getEntityName(), view.entityName);
	}


	public Entity getEntity() {
		return entity;
	}

	
}
